The Database API > Database API functions > MMDB.getSPColumnListNamedParams() |
![]() ![]() ![]() |
MMDB.getSPColumnListNamedParams()
Availability
Dreamweaver UltraDev 1.0
Description
Gets a list of result set columns that are generated by a call to the specified stored procedure.
Arguments
connName
, statement
, paramNameArray
, paramValuesArray
![]() |
connName is an UltraDev connection name as specified in the Connection Manager. It is used to make a database connection to a live data source. |
![]() |
statement is the name of the stored procedure that returns the result set when executed. |
![]() |
paramNameArray is an array containing a list of parameter names. You can use the MMDB.getSPParamsAsString() function to get the parameters of the stored procedure. |
![]() |
paramValuesArray is an array containing a list of design-time parameter test values. Optional, specify if the procedure requires parameters when executed. If you have provided parameter names in paramNameArray , specify the parameter values in the same order as their corresponding parameter names appear in paramNameArray . If you did not provide paramNameArray , specify the values in the order in which the stored procedure expects them. |
Returns
An array of strings representing the list of columns. This function returns an error if the SQL statement is invalid or if the connection string is wrong.
Example
The following code could return a list of result set columns that were generated from the executed stored procedure, getNewEmployeesMakingAtLeast
:
var paramNameArray = new Array("startDate", "salary") var paramValueArray = new Array("2/1/2000", "50000") var columnArray = MMDB.getSPColumnListNamedParams("EmpDB",¬ "getNewEmployeesMakingAtLeast", paramNameArray, paramValueArray)
These are the returned values:
columnArray[0] = "EmpID", columnArray[1] = "LastName",¬ columnArray[2] ="startDate", columnArray[3] = "salary"
![]() ![]() ![]() |